package application

import (
	"tools.hezhuyun/checker/domain/entity"
	"tools.hezhuyun/checker/domain/repository"
)

type folderApp struct {
	repo repository.FolderRepository
}

var _ FolderAppInterface = &folderApp{}

type FolderAppInterface interface {
	GetFolder(uint64) (*entity.Folder, error)
	GetFoldersByCode(string) ([]entity.Folder, error)
}

func (f *folderApp) GetFolder(folderID uint64) (*entity.Folder, error) {
	return f.repo.GetFolder(folderID)
}

func (f *folderApp) GetFoldersByCode(code string) ([]entity.Folder, error) {
	return f.repo.GetFoldersByCode(code)
}
